log using "$logpath/03_Statistics_in_text_JEEA_final", replace
******************************************************************************************************************
*****Statistics in text (Main text)
*******************************************************************************************************************

******************************************************************************************************************
****Section 2.4 ************

		/* Effects of group "cover". We find that making decisions in GC_Hidden systematically increases the prevalence of destructive behavior (Figure 2 and Table 1) from 4% in Individual to 13% in GC_Hidden (Chi-square test, p-value < 0.001) in the conditional decision when the counterpart is not destructive. Similarly, for the index, we observe an increase in destructive behavior from 20% to 27% (Wilcoxon rank-sum test, p-value = 0.001).*/

		use "$cleandatapath/Experiment1.dta", replace

		tab Treatment

		ttest JD_ifnice if (Treatment==2|Treatment==1), by(Treatment) 
		tab JD_ifnice Treatment if (Treatment==2|Treatment==1), chi2 exact

		ttest JD_index if (Treatment==2|Treatment==1), by(Treatment) 
		ranksum JD_index if (Treatment==2|Treatment==1), by(Treatment) 

		/* Effects of observability. (...) We find that, for the conditional decision when the counterpart was not destructive, the prevalence of destructive behavior is 7% in GC_Observed, which is smaller than the prevalence of 13% in GC_Hidden (Chi-square test, p-value = 0.008). For the index, we also observe a drop in the prevalence of destructive behavior in GC_Observed as compared to GC_Hidden, from 27% to 24%, but the difference is not statistically significant (Wilcoxon rank-sum test, p-value = 0.180). */

		use "$cleandatapath/Experiment1.dta", replace

		tab Treatment

		ttest JD_ifnice if (Treatment==3|Treatment==2), by(Treatment) 
		tab JD_ifnice Treatment if (Treatment==3|Treatment==2), chi2 exact

		ttest JD_index if (Treatment==3|Treatment==2), by(Treatment) 
		ranksum JD_index if (Treatment==3|Treatment==2), by(Treatment) 

		/* Effects of group decision-making. (...) In the conditional decision when the counterpart was not destructive, the prevalence of destructive behavior falls from 13% in GC_Hidden to 2% in Group (Chi-square test, p-value < 0.001). For the index, there is a reduction from 27% to 16% (Wilcoxon rank-sum test, p-value < 0.001). */

		use "$cleandatapath/Experiment1.dta", replace

		tab Treatment

		ttest JD_ifnice if (Treatment==4|Treatment==2), by(Treatment) 
		tab JD_ifnice Treatment if (Treatment==4|Treatment==2), chi2 exact

		ttest JD_index if (Treatment==4|Treatment==2), by(Treatment) 
		ranksum JD_index if (Treatment==4|Treatment==2), by(Treatment) 
		
		/* In PDG, the defection rate in the conditional decision when the counterpart acted cooperatively increases from 46% in GC_Hidden to 55% in Group (Chi-square test, p-value = 0.039). For the index, the prevalence of defection increases from 64% to 72% (Wilcoxon rank-sum test, p-value = 0.007). */
		
		
use "$cleandatapath/Experiment1.dta", replace

		tab Treatment

		ttest PD_ifnice if (Treatment==4|Treatment==2), by(Treatment) 
		tab PD_ifnice Treatment if (Treatment==4|Treatment==2), chi2 exact

		ttest PD_index if (Treatment==4|Treatment==2), by(Treatment) 
		ranksum PD_index if (Treatment==4|Treatment==2), by(Treatment) 
		
		/* Additional results about preference-aggregation in groups. (...) We find that 98% of the groups follow a median a priori opinion in JDG when such an opinion implies maximization of their own group payoffs, and only 2% switch to the destructive strategy after joint discussion and deliberation (Panel A of Table A.5). In contrast, when the initial judgement of the median group member is to destroy (there are few such cases), 89% of the groups ultimately agree on the non-destructive strategy. */
		
		*Mean behavior when majority is nice
		sum JD_ifnice if Treatment==4 & JDnice_GROUPmajority==0
		
		*Mean behavior when majority is nasty
		sum JD_ifnice if Treatment==4 & JDnice_GROUPmajority==1

******************************************************************************************************************
****Section 2.5 ************

		/* In Figure A.2, we report the distribution of these beliefs and find that a much larger percentage of subjects (46%) in GC_Hidden expect both group members to be non-destructive compared to those who expect both group members to be destructive (7%). The difference is even larger in GC_Observed.*/

		use "$cleandatapath/Experiment1.dta", replace
		tab Treatment
		tab JD_bel_twooth if Treatment==2
		tab JD_bel_twooth if Treatment==3

******************************************************************************************************************
****Section 3.3 ************

		/* In JDG (Panel A of Table A.7), participants in Individual chose the destructive option in 13% of cases, while participants in GC_Hidden chose the destructive option in 21% of cases. Thus, making a decision under the cover of the group rather than individually increases the prevalence of destructive behavior by around 62% (Chi-square test, p-value < 0.001, Figure 3 and Table A.7).*/
	
		use "$cleandatapath/Experiment2.dta", replace

		tab Treatment
		
		ttest JD_ifnice if (Treatment==2|Treatment==1), by(Treatment) 
		tab JD_ifnice Treatment if (Treatment==2|Treatment==1), chi2 exact

		/* For the index, the prevalence of destructive behavior increases from 21% in Individual to 29% in GC_Hidden (Wilcoxon rank-sum test, p-value < 0.001, Figure 3 and Table A.7). */

		use "$cleandatapath/Experiment2.dta", replace
	
		ttest JD_index if (Treatment==2|Treatment==1), by(Treatment) 
		ranksum JD_index if (Treatment==2|Treatment==1), by(Treatment) 

		/* Making decisions in GC_Hidden also influences behavior in PDG (Panel B of Table A.7). For conditional decisions when the counterpart acted cooperatively, the prevalence of defection increases from 23% in Individual to 34% in GC_Hidden (Chi-square test, p-value < 0.001). When we focus on the index, the defection rate rises from 35% to 42% (Wilcoxon rank-sum test, p-value < 0.001).*/
	
		use "$cleandatapath/Experiment2.dta", replace

		tab Treatment
		
		ttest PD_ifnice if (Treatment==2|Treatment==1), by(Treatment) 
		tab PD_ifnice Treatment if (Treatment==2|Treatment==1), chi2 exact

		ttest PD_index if (Treatment==2|Treatment==1), by(Treatment) 
		ranksum PD_index if (Treatment==2|Treatment==1), by(Treatment) 

******************************************************************************************************************
****Section 4.2 ************

	/*In Table 3, Panel B, we show that participants in CG_Hidden allocate systematically less money to a counterpart than do participants in Individual (OLS, p-value = 0.030).*/ 

		use "$cleandatapath/Experiment3.dta", replace

		tab decision_main
		tab decision_main, nolabel
		recode decision_main (1=-1) (2=0) (3=1)
		
		reg decision_main Treatment_GC if COSTLY==1 , robust

		/* Next, importantly, we show that the differences in allocations are driven by both a greater tendency to engage in nasty behavior and by a somewhat lower willingness to give to others. Specifically, in Individual, 3.3% of subjects chose to destroy earnings of the counterpart, and the prevalence of destruction increases by 2 percentage points to 5.2% in GC_Hidden (Chi-square test, p-value = 0.050, Figure 5 and Table A.11), a 58% increase in the prevalence of destructive behavior. */
		
		use "$cleandatapath/Experiment3.dta", replace

		tab Treatment_GC COSTLY
		ttest antisocial if (COSTLY==1), by(Treatment_GC) 
		tab antisocial Treatment_GC if COSTLY==1, chi2 exact
		
		/* We also observe some reduction in the prevalence of helping behavior, from 14.7% in Individual to 12.3% in the GC_Hidden, although this difference is not statistically significant at conventional levels (Chi-square test, p-value = 0.147, Table A.11).*/
		
		use "$cleandatapath/Experiment3.dta", replace

		tab Treatment_GC COSTLY
		ttest prosocial if (COSTLY==1), by(Treatment_GC) 
		tab prosocial Treatment_GC if COSTLY==1, chi2 exact


		/* In the Individual condition in E.2, the likelihood of choosing the destructive option is 13% in the conditional decision, when decision-makers knew that their counterpart chose not to be destructive, whereas the likelihood of choosing the destructive option is only 3.3% in E.3.*/
		
		use "$cleandatapath/Experiment2.dta", replace
		tab Treatment
		sum JD_ifnice if Treatment==1 
		
		use "$cleandatapath/Experiment3.dta", replace
		tab Treatment_GC COSTLY
		sum antisocial if COSTLY==1 & Treatment_GC==0


		/*Footnote 25: To explore this more directly, in 2022 we implemented a supplementary experiment (N=808), described in more detail in Online Appendix D (...) The prevalence of destructive choices is 4% in Variant A and 3.2% in Variant B (Chi-square test, p-value = 0.580).   */
		
		use "$cleandatapath/Supplementary_Experiment.dta", clear
		
		ttest antisocial, by(Treatment) /*p=0.580*/
		tab antisocial Treatment, chi2 /*p=0.580*/
		
******************************************************************************************************************
****Section 5 ************	
	
	/* In Individual, the prevalence of destructive behavior conditional on the counterpart not being destructive is 4% among Slovak university students (E.1), 13% among Slovak adults (E.2), and increases to 29% among Slovak adolescents (PE.1) and 44% among Ugandan adolescents (PE.2).*/
	
		use "$cleandatapath/Experiment1.dta", replace
		sum JD_ifnice if Treatment==1 
	
		use "$cleandatapath/Experiment2.dta", replace
		sum JD_ifnice if Treatment==1 

		use "$cleandatapath/Pilot_Experiment1.dta", replace
		sum JD_ifnice if Treatment==1 
		
		use "$cleandatapath/Pilot_Experiment2.dta", replace
		sum JD_ifnice if Treatment==1 

	/* Only in E.3., we used a simplified version of the approach developed by Krupka and Weber (2013) to elicit perceptions of norms for behavior in the allocation task. We asked participants to guess the views of ten individuals who did not make the allocation decisions themselves, in terms of their appropriateness ratings of choosing the destructive option. As expected, we find that most participants (72%) believe that a majority of people perceive the choice of the destructive option as being socially inappropriate, and that appropriateness ratings intuitively correlate with choices in the allocation task (Spearman's rho between a destructive choice and its appropriateness rating = 0.15, p-value<0.001) */		
	
		use "$cleandatapath/Experiment3.dta", replace

		*Think that the majority of others (>5) rank the choice as inappropriate
		gen Norms_antisocial_inapp=Norms_antisocial_1+Norms_antisocial_2+Norms_antisocial_3
		recode Norms_antisocial_inapp (0/5=0) (5.5/10=1)
		tab Norms_antisocial_inapp /* pooled, 72%, using this number*/
		
		*Correlation with the actual choices
		spearman antisocial Norms_antisocial_score

		
******************************************************************************************************************

log close	

